package com.jctrip.hotel.source.service.dossen;

import java.math.BigDecimal;
import java.util.List;
import java.util.function.Function;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jctrip.hotel.source.model.OrderDataResult;
import com.jctrip.hotel.source.model.PriceCheckParam;
import com.jctrip.hotel.source.model.dossen.DossenAddOrderReq;
import com.jctrip.hotel.source.model.dossen.DossenCancelOrderReq;
import com.jctrip.hotel.source.model.dossen.DossenCheckPriceAndCountReq;
import com.jctrip.hotel.source.model.dossen.DossenCityData;
import com.jctrip.hotel.source.model.dossen.DossenGetHotelInfoReq;
import com.jctrip.hotel.source.model.dossen.DossenGetHotelRoomTypeReq;
import com.jctrip.hotel.source.model.dossen.DossenGetOrdersReq;
import com.jctrip.hotel.source.model.dossen.DossenGetPriceAndCountReq;
import com.jctrip.hotel.source.model.dossen.DossenHotelData;
import com.jctrip.hotel.source.model.dossen.DossenOrderData;
import com.jctrip.hotel.source.model.dossen.DossenPriceAndCountData;
import com.jctrip.hotel.source.model.dossen.DossenRatePlanData;
import com.jctrip.hotel.source.model.dossen.DossenRoomTypeData;
import com.jctrip.hotel.source.model.dossen.DossenTokenData;
import com.jctrip.hotel.source.model.wehotel.req.OrderData;

/**
 * @Author henry
 * @Date 2023/6/6 21:43
 * @Description
 */
public interface DossenService {

    String parseHotelId(String innId);

    String parseInnId(String hotelId);

    DossenTokenData token(String appId, String key);

    String tokenCache(String appId, String key);

    List<DossenCityData> getCitiesList(String appId, String key);

    Page<DossenHotelData> getHotelInfo(String appId, String key, DossenGetHotelInfoReq dossenGetHotelInfoReq);

    List<DossenRoomTypeData> getHotelRoomType(String appId, String key,
            DossenGetHotelRoomTypeReq dossenGetHotelRoomTypeReq);

    List<DossenPriceAndCountData> getPriceAndCount(String appId, String key, DossenGetPriceAndCountReq dossenGetPriceAndCountReq);

    List<DossenRatePlanData> getECRateplan(String appId, String key);

    Integer getBreakfastCount(String appId, String key, String hotelId, String activityCode);


    List<DossenPriceAndCountData> checkPriceAndCount(String appId, String key, DossenCheckPriceAndCountReq dossenCheckPriceAndCountReq) ;


    /**
     * 容差判断，下单
     * @param appId
     * @param key
     * @param dossenAddOrderReq
     * @param priceCheck
     * @return
     */
    OrderDataResult postOrder(String appId, String key, DossenAddOrderReq dossenAddOrderReq, PriceCheckParam priceCheck) ;

    /**
     * 无容差判断，直连下单
     * @param appId
     * @param key
     * @return
     */
    OrderDataResult postOrder(String appId, String key, DossenAddOrderReq dossenAddOrderReq) ;
    /**
     *
     * @param appId
     * @param key
     * @param orderNo 东呈订单号
     * @param outOrderNo  jc 订单号
     * @return
     */
    OrderData queryOrderData(String appId, String key, String orderNo, String outOrderNo);

    DossenOrderData getOrder(String appId, String key, DossenGetOrdersReq dossenGetOrdersReq) ;
    DossenOrderData getDirectOrder(String sourceId, DossenGetOrdersReq dossenGetOrdersReq) ;

    void cancelOrder(String appId, String key, DossenCancelOrderReq dossenCancelOrderReq);
}
